﻿Imports System.Collections.Generic
Imports System.Linq
Imports System.Text
Imports System.Data
Imports System.Data.SqlClient
Imports DoAnQuanLyBanHang1065043_1065007.DoAnQuanLyBanHang.General

Namespace DoAnQuanLyBanHang.DTO
    Public Class PhanNhomNguoiDungData
        Private m_PhanNhomNguoiDungData As New DataService()

        Public Function LayPhanNhomNguoiDung() As DataTable
            Dim cmd As New SqlCommand("SELECT * FROM Phan_Nhom")
            m_PhanNhomNguoiDungData.Load(cmd)
            Return m_PhanNhomNguoiDungData
        End Function

        Public Function ThemDongMoi() As DataRow
            Return m_PhanNhomNguoiDungData.NewRow()
        End Function

        Public Sub ThemPhanNhomNguoiDung(m_Row As DataRow)
            m_PhanNhomNguoiDungData.Rows.Add(m_Row)
        End Sub

        Public Function LuuPhanNhomNguoiDung() As Boolean
            Return m_PhanNhomNguoiDungData.ExecuteNoneQuery() > 0
        End Function

    End Class
End Namespace
